﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ServiceCategory.aspx.cs" Inherits="Main_ServiceInvoice_ServiceCategory" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Service Category</title>
     <link rel="Stylesheet" href="../../Styles/accounts.css" type="text/css" />
     <script src="../../JavaScript/Commons.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <acc:heading ID="pagehead" runat="server" HeadingText="Service Category" /> 
    <div class="divmain" style="margin-left:30%; margin-right:30%; width:40%;"  >
        <asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label>
        <table class="tablecontent" style="margin-top:2%; width:100%">
            <tr>
                <td class="headtd" colspan="2"> Service Category </td>
            </tr>
           
            <tr>
                <td> Name</td>
                <td> <asp:TextBox ID="TxtCategoryName" CssClass="input" runat="server" ValidationGroup="V"></asp:TextBox> 
                    <asp:RequiredFieldValidator ID="RFVTxtCategoryName" ValidationGroup="V" runat="server" Display="Dynamic" ErrorMessage="*" ControlToValidate="TxtCategoryName"></asp:RequiredFieldValidator>
                </td>
            </tr>

            <tr>
                <td colspan="2"></td>
            </tr>

            <tr>
                <td>&nbsp; </td>
                <td>
                    <asp:Button ID="btnSubmit" Text="Submit" runat="server" CssClass="button" OnClick="btnSubmit_Click" ValidationGroup="V"/> &nbsp;
                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CssClass="button"  OnClick="btnCancel_Click" /> 
                </td>
            </tr>
        </table>
      </div>

        <div style="width:50%; margin-left:25%; margin-right:25%; margin-top:2%">
                <asp:GridView ID="GrdCategory" runat="server" Width="100%" AutoGenerateColumns="false" CssClass="gridview"
                 PageSize="15" AllowPaging="true" AlternatingRowStyle-CssClass="gridview_alternate"
                 RowStyle-CssClass="gridviewitem" PagerStyle-CssClass="pgr" EmptyDataRowStyle-CssClass="emptyrow"
                 EmptyDataText="No Record Exist!" onrowediting="GrdCategory_RowEditing" 
                 DataKeyNames="SERVICECATEGORYID"
                    onrowcancelingedit="GrdCategory_RowCancelingEdit" onrowupdating="GrdCategory_RowUpdating" 
                
                 >
                <Columns>
                    <asp:TemplateField HeaderText="Sr No.">
                        <ItemTemplate> <%#Container.DataItemIndex+1 %> </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center"/>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="Service Category" DataField="SERVICECATEGORY" />
                    <asp:CommandField HeaderText="Action"  EditText="<img src='../../Menu/images/Edit_user.png' alt='Edit'>" ShowEditButton="true" UpdateText="<img src='../../Menu/images/update.png' alt='Update'>" CancelText="<img src='../../Menu/images/cancel.png' alt='Cancel'>" ItemStyle-HorizontalAlign="Center" /> 

                </Columns>
                </asp:GridView>
        </div>
    
  
    </form>
</body>
</html>
